package si.yun.dao;

import org.apache.ibatis.annotations.Param;
import si.yun.entity.SyUserCouponUsed;
import si.yun.entity.SyUserCouponUsedExample;

import java.util.List;
import java.util.Map;

public interface SyUserCouponUsedMapper {
    long countByExample(SyUserCouponUsedExample example);

    int deleteByExample(SyUserCouponUsedExample example);

    int deleteByPrimaryKey(Integer usedId);

    int insert(SyUserCouponUsed record);

    int insertSelective(SyUserCouponUsed record);

    List<SyUserCouponUsed> selectByExample(SyUserCouponUsedExample example);

    SyUserCouponUsed selectByPrimaryKey(Integer usedId);

    int updateByExampleSelective(@Param("record") SyUserCouponUsed record, @Param("example") SyUserCouponUsedExample example);

    int updateByExample(@Param("record") SyUserCouponUsed record, @Param("example") SyUserCouponUsedExample example);

    int updateByPrimaryKeySelective(SyUserCouponUsed record);

    int updateByPrimaryKey(SyUserCouponUsed record);
/**
 * @Author : 栾佳俊
 * @Date : 2021/9/9 17:07
 * @Param : 
 * @Return : 
 */
    List<Map<String, Object>> selCouponUsed(@Param("account") String account,
                                            @Param("nickname") String nickname,
                                            @Param("user_id") Integer user_id);
    /**
     * @author: DZQ
     * @description: 赠送优惠券
     * @date: 2021/10/11 14:52
     * @return
     */
    int addCouponUsed(List list);
    /**
     * @author: DZQ
     * @description: 成功剩余数量减一
     * @date: 2021/10/11 14:52
     * @return
     */
    int addCouponUsed1(List list);
}